﻿using EasyCore.DependencyInjection;
using EasyCore.DependencyInjection.Attributes;
using Microsoft.AspNetCore.Authorization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EasyCore.EndpointAudits
{
    /// <summary>
    /// 终节点审计信息处理器
    /// </summary>
    public interface IEndpointAuditHandler: IScopedDependency
    {
        /// <summary>
        /// 处理数据：例如保存到数据库中，或内存中
        /// </summary>
        /// <returns></returns>
        public Task HandleAsync(EndpointAuditResult input);
    }

    [IgnoreDependency]
    public class EndpointAuditDefaultHandler : IEndpointAuditHandler
    {
        public async Task HandleAsync(EndpointAuditResult input)
        {
            await Task.CompletedTask;
        }
    }

}
